/* ===== 基础变量 ===== */
:root {
    --primary-color: #07689f;
    --secondary-color: #e74c3c;
    --bg-light: #f8f9fa;
    --text-dark: #2d3436;
    --text-light: #666;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

/* ===== 头部样式 ===== */
.food-header {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url('../image/海南美食-bg.jpg') center/cover;
    background-attachment: fixed;
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.food-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(7,104,159,0.3), transparent);
    animation: gradientShift 8s infinite alternate;
}



.popular-tags {
    margin-top: 15px;
    color: white;
}

.popular-tags a {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    margin: 0 5px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.popular-tags a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ===== 导航栏样式 ===== */
.food-nav {
    background: white;
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    z-index: 1020;
    position: sticky;
    top: 56px;
}

.food-nav .nav-link {
    color: var(--text-dark);
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.food-nav .nav-link i {
    margin-right: 8px;
}

.food-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* ===== 美食卡片样式 ===== */
.food-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.food-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-lg);
}

.food-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.food-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.food-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.food-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,69,58,0.9);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1;
}

.food-content {
    padding: 25px;
}

.food-info {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.food-info span {
    display: inline-flex;
    align-items: center;
    background: rgba(7,104,159,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.food-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* ===== 标签样式 ===== */
.taste-tags {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.taste-tags span {
    background: var(--bg-light);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
    cursor: pointer;
}

.taste-tags span:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===== 小吃网格布局 ===== */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.snack-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.snack-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== 动画效果 ===== */
@keyframes gradientShift {
    from { opacity: 0.3; }
    to { opacity: 0.7; }
}

@keyframes shine {
    100% { left: 125%; }
}

/* ===== 响应式布局 ===== */
@media (max-width: 992px) {
    .food-nav {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .food-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .food-nav::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
}

@media (max-width: 768px) {
    .food-header {
        padding: 80px 0 40px;
    }

    .food-nav .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .food-info {
        flex-direction: column;
        gap: 10px;
    }

    .food-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .food-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 576px) {
    .food-search {
        margin: 20px 15px;
    }
    
    .popular-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .food-content {
        padding: 15px;
    }
} 